home *** CD-ROM | disk | FTP | other *** search
- /*
- IC R API.h
-
- Header file for ICR* API.
-
- The ICR* routines work directly on resource files. These routines make up the heart of the
- InternetConfig system, as the rest of the pieces call these routines to do the actual work.
-
-
- */
-
- #pragma once
-
- #ifndef __H_IC_R_API__
- #define __H_IC_R_API__
-
- /* ICRStruct - Internal structure for the IC system */
- /* This is *completely* private to the implementation */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct ICRStruct {
- ComponentInstance instance; // null if no component available, if not null then rest of the struct is junk
- Boolean have_config_file;
- FSSpec config_file;
- short config_refnum;
- ICPerm perm;
- Str63 default_filename;
- Str255 prompt;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct ICRStruct ICRRecord,* ICRRecordPtr,** *ICRRecordHdl;
-
- /* Prototypes */
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- // for information on these routines, see the IC API Descriptions.h file
-
- /* ***** Starting Up and Shutting Down ***** */
-
- ICError ICRStart(ICRRecordPtr inst,OSType creator);
- ICError ICRStop(ICRRecordPtr inst);
-
- /* ***** Specifying a Configuration ***** */
-
- ICError ICRFindConfigFile(ICRRecordPtr inst,short count,ICDirSpecArrayPtr folders);
- ICError ICRFindUserConfigFile(ICRRecordPtr inst,ICDirSpec* where);
- ICError ICRGeneralFindConfigFile(ICRRecordPtr inst,Boolean search_prefs,Boolean can_create,short count,ICDirSpecArrayPtr folders);
- ICError ICRChooseConfig(ICRRecordPtr inst);
- ICError ICRChooseNewConfig(ICRRecordPtr inst);
- ICError ICRGetConfigName(ICRRecordPtr inst,Boolean longname,StringPtr name);
- ICError ICRGetConfigReference(ICRRecordPtr inst,ICConfigRefHandle ref);
- ICError ICRSetConfigReference(ICRRecordPtr inst,ICConfigRefHandle ref,long flags);
- ICError ICRSpecifyConfigFile(ICRRecordPtr inst,FSSpecPtr config);
-
- /* ***** Getting Information ***** */
-
- ICError ICRGetSeed(ICRRecordPtr inst,long* seed);
- ICError ICRGetPerm(ICRRecordPtr inst,ICPerm* perm);
- ICError ICRDefaultFileName(ICRRecordPtr inst,StringPtr name);
-
- /* ***** Reading and Writing Preferences ***** */
-
- ICError ICRBegin(ICRRecordPtr inst,ICPerm perm);
- ICError ICRGetPref(ICRRecordPtr inst,StringPtr key,ICAttr* attr,Ptr buf,long* size);
- ICError ICRSetPref(ICRRecordPtr inst,StringPtr key,ICAttr attr,Ptr buf,long size);
- ICError ICRFindPrefHandle(ICRRecordPtr inst,StringPtr key,ICAttr* attr,Handle prefh);
- ICError ICRGetPrefHandle(ICRRecordPtr inst,StringPtr key,ICAttr* attr,Handle* prefh);
- ICError ICRSetPrefHandle(ICRRecordPtr inst,StringPtr key,ICAttr attr,Handle prefh);
- ICError ICRCountPref(ICRRecordPtr inst,long* count);
- ICError ICRGetIndPref(ICRRecordPtr inst,long n,StringPtr key);
- ICError ICRDeletePref(ICRRecordPtr inst,StringPtr key);
- ICError ICREnd(ICRRecordPtr inst);
-
- /* ***** User Interface Stuff ***** */
-
- ICError ICREditPreferences(ICRRecordPtr inst,StringPtr key);
-
- /* ***** URL Handling ***** */
-
- ICError ICRParseURL(ICRRecordPtr inst,StringPtr hint,Ptr data,long len,long* selStart,long* selEnd,Handle url);
- ICError ICRLaunchURL(ICRRecordPtr inst,StringPtr hint,Ptr data,long len,long* selStart,long* selEnd);
-
- /* ***** Mappings Routines *****
- *
- * Routines for interrogating mappings database.
- *
- * ----- High Level Routines -----
- */
-
- ICError ICRMapFilename(ICRRecordPtr inst,StringPtr filename,ICMapEntry* entry);
- ICError ICRMapTypeCreator(ICRRecordPtr inst,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry);
-
- /* ----- Mid Level Routines ----- */
-
- ICError ICRMapEntriesFilename(ICRRecordPtr inst,Handle entries,StringPtr filename,ICMapEntry* entry);
- ICError ICRMapEntriesTypeCreator(ICRRecordPtr inst,Handle entries,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry);
-
- /* ----- Low Level Routines ----- */
-
- ICError ICRCountMapEntries(ICRRecordPtr inst,Handle entries,long* count);
- ICError ICRGetIndMapEntry(ICRRecordPtr inst,Handle entries,long ndx,long* pos,ICMapEntry* entry);
- ICError ICRGetMapEntry(ICRRecordPtr inst,Handle entries,long pos,ICMapEntry* entry);
- ICError ICRSetMapEntry(ICRRecordPtr inst,Handle entries,long pos,ICMapEntry* entry);
- ICError ICRDeleteMapEntry(ICRRecordPtr inst,Handle entries,long pos);
- ICError ICRAddMapEntry(ICRRecordPtr inst,Handle entries,ICMapEntry* entry);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __H_IC_R_API__ */
-
-
-
-